package com.xxtx.trade.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

/**
 * 功能描述:
 *
 * @Params:
 * @Author: xuliang
 * @email: northly@live.com
 * @Date: 2020/1/12 10:37
 */
//@Validated
@ConfigurationProperties(prefix = "pay")
@Component
public class WxPayProperties {
    /***
     * 公众号ID
     */
    private String appId;

    /***
     * 商户ID
     */
    private String mchId;

    /**
     * 签名字符串
     */
    private String keySign;

    /**
     * wx公众号appSecret
     */
    private String appSecret;

    /**
     * 支付证书地址
     */
    private String p12Path;

    /**
     * 回调地址
     */
//    @Pattern(regexp = "/(http|https):\\/\\/([a-zA-Z.]+\\/?)\\S*/")
    private String notify;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getKeySign() {
        return keySign;
    }

    public void setKeySign(String keySign) {
        this.keySign = keySign;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getP12Path() {
        return p12Path;
    }

    public void setP12Path(String p12Path) {
        this.p12Path = p12Path;
    }

    public String getNotify() {
        return notify;
    }

    public void setNotify(String notify) {
        this.notify = notify;
    }
}
